home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Dialog2 / c / Create next >
Text File  |  1995-05-19  |  2KB  |  60 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    Dialog2.Create.c
  12.     Author:  Copyright © 1994 Julian Smith
  13.     Version: 1.03 (13 Mar 1995)
  14.     Purpose: Dialogue box handling
  15. */
  16.  
  17.  
  18. #include <stdlib.h>
  19.  
  20. #include "DeskLib:Error.h"
  21. #include "DeskLib:Template.h"
  22. #include "DeskLib:Dialog2.h"
  23.  
  24.  
  25. dialog2_block    *Dialog2_CreateDialogBlock( 
  26.     char            *templatename, 
  27.     icon_handle        okbutton,
  28.     icon_handle        cancelbutton,
  29.     dialog2_openfn        openfn,
  30.     dialog2_okfn        okfn,
  31.     void            *reference
  32.     )
  33. {
  34. dialog2_block    *dialog2;
  35.  
  36. dialog2 = malloc( sizeof( dialog2_block));
  37. if ( !dialog2)    {
  38.     Error_OutOfMemory( FALSE, "dialog2 box");
  39.     return NULL;
  40.     }
  41.  
  42. dialog2->window                = NULL;
  43. dialog2->templatename            = templatename;
  44. dialog2->reference            = reference;
  45. dialog2->openfn                = openfn;
  46. dialog2->okfn                = okfn;
  47.  
  48. dialog2->flags.value            = 0;
  49. dialog2->flags.data.type        = dialog2_type_CLOSED;
  50. dialog2->flags.data.keepwindow        = FALSE;
  51. dialog2->flags.data.notifyclose        = FALSE;
  52. dialog2->flags.data.okbutton        = okbutton;
  53. dialog2->flags.data.cancelbutton    = cancelbutton;
  54. dialog2->flags.data.maxtitlesize    = template_TITLEMIN;
  55.  
  56. return dialog2;
  57. }
  58.  
  59.  
  60.